package de.greenrobot.daogenerator.gentest;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class ExampleDaoGenerator {

	public static void main(String[] args) throws Exception {
		Schema schema = new Schema(3, "com.rc.activity.dao");

		Entity en = schema.addEntity("tbl_User");
		en.addLongProperty("UserID").primaryKey().index();
		en.addStringProperty("Username");
		en.addStringProperty("Email");
		en.addStringProperty("Password");
		en.addBooleanProperty("Status");
		en.addStringProperty("Token");
		en.addStringProperty("IsDefault");

		en = schema.addEntity("tbl_Profile");
		en.addLongProperty("UserID").primaryKey().index();
		en.addStringProperty("Name");
		en.addStringProperty("FirstName");
		en.addStringProperty("LastName");
		en.addBooleanProperty("Gender");
		en.addStringProperty("Birthdate");
		en.addStringProperty("Location");
		en.addStringProperty("MaritalStatus");
		en.addStringProperty("Profession");
		en.addStringProperty("CompanyName");
		en.addStringProperty("AddressFirst");
		en.addStringProperty("Mobile");

		en = schema.addEntity("tbl_Settings");
		en.addLongProperty("UserID").primaryKey().index();
		en.addStringProperty("Timezone");
		en.addStringProperty("CurrencyCode");
		en.addStringProperty("CurrencyName");
		en.addLongProperty("AutoArchive");

		en = schema.addEntity("tbl_Count");
		en.addStringProperty("Name");
		en.addStringProperty("Total");

		en = schema.addEntity("tbl_Receipt");
		en.addLongProperty("ReceiptID").primaryKey().index();
		en.addLongProperty("MerchantID");
		en.addFloatProperty("Total");
		en.addFloatProperty("Discount");
		en.addFloatProperty("Subtotal");
		en.addFloatProperty("Tax");
		en.addStringProperty("CurrencyCode");
		en.addFloatProperty("ExchangeRate");
		en.addBooleanProperty("ReportStatus");
		en.addStringProperty("PurchaseTime");
		en.addStringProperty("CreatedTime");
		en.addIntProperty("IsArchived");
		en.addIntProperty("IsOpened");
		en.addIntProperty("IsNew");
		en.addStringProperty("Info");
		en.addStringProperty("ReceiptImage");
		en.addIntProperty("Status");
		en.addStringProperty("ReceiptType");
		en.addStringProperty("MerchantCountry");
		en.addStringProperty("IsDelete");
		en.addStringProperty("IsUpdate");
		en.addStringProperty("IsCreate");

		en = schema.addEntity("tbl_Trip");
		en.addLongProperty("TripID").primaryKey().index();
		en.addLongProperty("Report_ID");
		en.addStringProperty("Name");
		en.addStringProperty("Departure");
		en.addStringProperty("Arrival");
		en.addStringProperty("StartDate");
		en.addStringProperty("EndDate");
		en.addStringProperty("Type");
		en.addStringProperty("CreatedTime");
		en.addStringProperty("ReportStatus");
		en.addStringProperty("Reference");
		en.addIntProperty("IsArchived");
		en.addStringProperty("TripLeg");
		en.addStringProperty("Status");
		en.addStringProperty("Claimed");
		en.addIntProperty("IsClaimed");
		en.addIntProperty("IsApproved");
		en.addIntProperty("IsSubmitted");
		en.addIntProperty("IsAllApproved");
		en.addStringProperty("Amount");
		en.addStringProperty("Approved");

		en = schema.addEntity("tbl_TripItem");
		en.addLongProperty("TripItemID").primaryKey().index();
		en.addLongProperty("TripID");
		en.addIntProperty("IsClaimed");
		en.addIntProperty("IsApproved");

		en = schema.addEntity("tbl_Item");
		en.addLongProperty("ItemID").primaryKey().index();
		en.addLongProperty("ReceiptID");
		en.addLongProperty("CategoryID");
		en.addLongProperty("TripID");
		en.addStringProperty("Name");
		en.addFloatProperty("Amount");
		en.addIntProperty("CategorizeStatus");
		en.addIntProperty("ItemApp");
		en.addIntProperty("ExpensePeriod");
		en.addStringProperty("Memo");

		en = schema.addEntity("tbl_Category");
		en.addLongProperty("CategoryID").primaryKey().index();
		en.addStringProperty("Name");
		en.addIntProperty("Parent");
		en.addIntProperty("Creator");

		en = schema.addEntity("tbl_Report");
		en.addLongProperty("ReportID").primaryKey().index();
		en.addStringProperty("Title");
		en.addStringProperty("Amount");
		en.addStringProperty("Approved");
		en.addStringProperty("Date");
		en.addStringProperty("Status");
		en.addIntProperty("IsArchived");
		en.addStringProperty("ReportType");
		en.addStringProperty("ApproverEmail");
		en.addStringProperty("CreatedTime");
		en.addStringProperty("IsDelete");
		en.addStringProperty("IsUpdate");
		en.addStringProperty("IsCreate");
		en.addStringProperty("Reference");

		en = schema.addEntity("tbl_Merchant");
		en.addLongProperty("MerchantID").primaryKey().index();
		en.addStringProperty("Name");
		en.addStringProperty("Logo");
		en.addStringProperty("Address");
		en.addStringProperty("City");
		en.addStringProperty("State");
		en.addStringProperty("ZipCode");
		en.addStringProperty("PhoneNumber");

		new DaoGenerator().generateAll(schema, "../../Qsoft_RCI/src-dao");
	}

}
